<?php

/*
 * File name : Controller.php
 * Description : This is the Controller page of the MVC PHP Framework. This page includes call to the
 * 				 Model.php as well as the View.php page.
 * Created By : Pratibha Awasthi.
 */
	
	// Includes the Model.php page 
	include_once("Model/Model.php");  

    class Controller {  
    	 
    	 // $model points to an object of Model class
         public $model;   
      	 
         //Constructor initializes the Model
         public function __construct()  
         {  
              $this->model = new Model();  
         }   
      
         public function invoke()  
         {  
				
         		// Prints the header and the top menu of the application
         		$this->model->header();
				$this->model->top_menu_donor();
				$array_output = $this->model->current_pledges();
				
				// Process multiple returns from the Model
				$result_curr = $array_output[0];
				$row_curr = $array_output[1];
				$result = $array_output[2];
				
				// Include the contents of the View.php
				include "View/View.php";
				
				// Prints the footer of the application
				$this->model->footer();
         }  
    }  
?>